﻿using Microsoft.Extensions.Options;

namespace 配置系统_Json文件配置;

class SMTPConfig
{
    private readonly IOptionsSnapshot<Smtp> smtpConfig;

    public SMTPConfig(IOptionsSnapshot<Smtp> smtpConfig)
    {
        this.smtpConfig = smtpConfig;
    }

    public string GetSMTPConfig()
    {
        var mySmtpConfig = smtpConfig.Value;
        return mySmtpConfig.ToString();
    }
}